package com.lc.afbx;

import android.content.Context;

import com.zcx.helper.app.AppPreferences;

/**
 * Created by Administrator on 2016/3/14.
 */
public class BasePreferences extends AppPreferences {

    public BasePreferences(Context context, String name) {

        super(context, name);

    }

    public void saveIsGuide(boolean isGuide) {

        putBoolean("isGuide", isGuide);

    }

    public boolean readIsGuide() {

        return getBoolean("isGuide", false);

    }

    //是否登录
    public void saveIsLogin(boolean isLogin) {

        putBoolean("isLogin", isLogin);

    }

    public boolean readIsLogin() {

        return getBoolean("isLogin", false);

    }

    //是否支付
    public void saveIsSetPay(boolean isSetPay) {

        putBoolean("isSetPay", isSetPay);

    }

    public boolean readIsSetPay() {

        return getBoolean("isSetPay", false);

    }

    //用户id
    public void saveUserId(String userId) {

        putString("userId", userId);

    }

    public String readUserId() {

        return getString("userId", "");

    }

    //保存用户名
    public void saveUserName(String userName) {

        putString("userName", userName);

    }

    public String readUserName() {

        return getString("userName", "");

    }

    //保存客户经理编码
    public void saveCode(String code) {

        putString("messageCode", code);

    }

    public String readCode() {

        return getString("messageCode", "");

    }

    //保存定位成是ID
    public void saveCityID(String cityID) {

        putString("cityID", cityID);

    }

    public String readCityID() {

        return getString("cityID", "");

    }

    //保存主页 定位城市ID
    public void saveHomeCityID(String homeCityID) {

        putString("homeCityID", homeCityID);

    }

    public String readHomeCityID() {

        return getString("homeCityID", "230100");

    }

    //保存主页 定位城市name
    public void saveHomeCityName(String cityName) {

        putString("cityName", cityName);

    }

    public String readHomeCityName() {

        return getString("cityName", "哈尔滨");

    }

}
